The present invention relates to a method for diagnosis of a sensor, for instance in a motor vehicle having an internal combustion engine. A sensor of this kind that is to be diagnosed may for instance be a phase sensor on the camshaft of the motor vehicle. Depending on whether a detected variable is above or below a defined threshold value, such a sensor furnishes a corresponding output signal.
Such a sensor is for instance a sensor that reacts to magnetic fields, by which the speed of rotation and/or the position of a transducer wheel that has teeth can be ascertained. A sensor of this kind is constructed and arranged such that the transducer wheel, whose position or rotary speed is to be ascertained, passes between the sensor and a magnet, causing the sensor to record a weak magnetic field when one tooth of the transducer wheel is just then diametrically opposite it, and to record a strong magnetic field when no tooth of the transducer wheel (that is, a gap) is just then diametrically opposite it (or vice versa). Such a sensor can operate inductively or be based on Hall or XMR technology.
FIG. 2 schematically shows one such arrangement with a transducer. In it, R indicates the transducer wheel, G indicates the magnet and the transducer containing the sensor, and W indicates the element on which the transducer wheel R is mounted and whose rotary speed and/or position is to be ascertained; the element W is for instance the crankshaft or the camshaft of an internal combustion engine.
For the sake of completeness it should be noted that the arrangement shown in FIG. 2 is shown highly schematically. In particular, in practice, the transducer wheel R may have more teeth, or differently shaped teeth.
The magnetic field recorded by the sensor is converted in the sensor into a current or a voltage, whose magnitude is directly or indirectly proportional to the magnitude of the magnetic field.
The sensor on which the method for diagnosis according to the invention is based outputs a digital signal. To that end, it compares the electrical variable, into which the recorded magnetic field was converted, with a threshold value, and it outputs a signal at a high level if and as long as the electrical variable is higher than the threshold value, and it outputs a signal at a low level if and as long as the electrical variable is less than the threshold value (or vice versa).
It should be clear and requires no further explanation that such a sensor outputs the output signal expected from it only if the threshold value has been correctly defined.
In practice, however, it is known that the magnitude of the magnetic field recorded by the sensor and the electrical variable into which it is converted is dependent on various factors, such as the temperature, the location of the sensor, the degree of soiling, aging, and so forth so that an originally optimally defined threshold value is suddenly no longer optimal or is even entirely unusable.
For this reason, self-calibrating sensors are often used, which are capable of automatically adapting the threshold value to given conditions. This can be done for instance in that during normal operations the sensors ascertain the range within which the variable to be compared with the threshold value varies, and then change the threshold value in such a way that it is located for instance precisely in the middle of this range.
However, this kind of self-calibration is not always successful. Specifically, it can be done only with the transducer wheel rotating, since only then can the range within which the variable to be compared with the threshold value varies be ascertained.
On the other hand, it is sometimes important, immediately after the sensor and/or the arrangement containing it has been put into operation, that is, while the transducer wheel is still at a standstill, to obtain information about the position or the rotary speed of the element to be monitored.
This is the case for instance if the sensor is used to monitor the position and/or the rotary speed of the camshaft of an internal combustion engine. In that case, it is desirable to obtain information about the position of the camshaft even before the engine is started. This information, or more precisely the information as to whether the sensor is just then diametrically opposite a transducer wheel tooth or a gap, is needed to enable optimal starting of the engine.
Since the sensor cannot calibrate if and as long as the camshaft is at a standstill, however, it cannot be assumed with certainty that the information that the sensor provides about the camshaft position is correct.
Equivalent problems exist in all other sensors whose output signal depends on whether a variable detected is above or below a threshold value.